-
Notifications
You must be signed in to change notification settings - Fork 31.8k
docs: Add Switch Transformers docstring notes and update spectrogram comment #43336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs: Add Switch Transformers docstring notes and update spectrogram comment #43336
Conversation
|
The failing tests are unrelated to this change; would appreciate a review when you get a chance thanks! |
|
The failing tests are unrelated to the change; the PR is ready for review, thanks! |
Rocketknight1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
ed76642 to
a7727fb
Compare
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
CI is red because of some PyTorch 2.10 incompatibilities, we'll pin 2.9 and try rerunning soon! |
Sounds great, thanks! |
a7727fb to
4ddb4fb
Compare
|
View the CircleCI Test Summary for this PR: https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=43336&sha=4ddb4f |
4ddb4fb to
dc36a63
Compare
|
[For maintainers] Suggested jobs to run (before merge) run-slow: switch_transformers |
What does this PR do?
The following documentation improvements are made in this PR:
num_sparse_encoder_layersandnum_sparse_decoder_layersparameterSwitchTransformersConfigexplaining that when set to 0 with a single layer model, the current implementation may still create a sparse layer due to the sparse step calculation. This edge case is not encountered in existing checkpoints.spectrogram()does not support batching, even thoughspectrogram_batch()already exists. Changed to a note referencing the batch function.Fixes #43335.
Before submitting
Pull Request section?
to it if that's the case.
[documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
[here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
cc: @Rocketknight1